From: Mathew McBride Date: Tue, 5 Dec 2023 14:12:03 +0000 (+1100) Subject: [23.05] backport "luci-app-attendedsysupgrade: add x86 efi/bios case" (#6623) X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=138595a7b6918896cd7686bdbaeef44204a987ce;p=project%2Fluci.git [23.05] backport "luci-app-attendedsysupgrade: add x86 efi/bios case" (#6623) * luci-app-attendedsysupgrade: add x86 efi/bios case x86 is the only target that allows you to install either EFI or BIOS images, thereby add an extra check for that. Signed-off-by: Paul Spooren (cherry picked from commit d7e905e83a11d59ea217cd37189040bd6c9d403e) * luci-app-attendedsysupgrade: fix search for x86 target The conditional is wrong. IndexOf returns a number and not true/false, so it does not work. Signed-off-by: Miguel Angel Mulero Martinez (cherry picked from commit 021c4394871e062964e1601775f4c951d0e2b878) --------- Co-authored-by: Paul Spooren Co-authored-by: Miguel Angel Mulero Martinez --- diff --git a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js index af0b1eef7a..450af35496 100644 --- a/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js +++ b/applications/luci-app-attendedsysupgrade/htdocs/luci-static/resources/view/attendedsysupgrade/overview.js @@ -88,8 +88,11 @@ return view.extend({ let image; for (image of images) { if (this.firmware.filesystem == image.filesystem) { - if (this.data.efi) { - if (image.type == 'combined-efi') { + // x86 images can be combined-efi (EFI) or combined (BIOS) + if(this.firmware.target.indexOf("x86") != -1) { + if (this.data.efi && image.type == 'combined-efi') { + return image; + } else if (image.type == 'combined') { return image; } } else {